#pragma once 
#include<pthread.h>
//未来锁的加解锁将和Lock对象的创建和销毁深刻绑定：
namespace ThreadMoudle
{
    class Lock
    {
    public:
        Lock(pthread_mutex_t* lock):_lock(lock)
        {
            pthread_mutex_lock(_lock);
        }
        ~Lock()
        {
            pthread_mutex_unlock(_lock);
        }
    private:
        pthread_mutex_t* _lock;
    };
}